/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.frogs.run;

import com.frogs.exception.FrogsMergeException;
import com.frogs.exception.FrogsPersistException;
import com.frogs.exception.FrogsRemoveException;
import com.frogs.manager.ManagerCategoria;
import com.frogs.manager.ManagerColor;
import com.frogs.manager.ManagerEmpresa;
import com.frogs.manager.ManagerEstilo;
import com.frogs.manager.ManagerSubCategoria;
import com.frogs.manager.ManagerSucursal;
import com.frogs.manager.ManagerTalla;
import com.frogs.model.Categoria;
import com.frogs.model.CategoriaPK;
import com.frogs.model.Color;
import com.frogs.model.Empresa;
import com.frogs.model.Estilo;
import com.frogs.model.Subcategoria;
import com.frogs.model.SubcategoriaPK;
import com.frogs.model.Sucursal;
import com.frogs.model.SucursalPK;
import com.frogs.model.Talla;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author gabrielbran
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        /*
        ManagerEmpresa me = new ManagerEmpresa();
        Empresa e = new Empresa();
        e.setNombre("Frogs");
        e.setFecha(new java.util.Date());
        e.setGiro("Venta de Zapatos");
        e.setNit("123456789");
        e.setRazonSocial("Grupo DNC");
        e.setRegistroIva("0123456789");
        try {
        me.guardaEmpresa(e);
        } catch (FrogsPersistException ex) {
        Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
         */
        /*
        ManagerSucursal ms = new ManagerSucursal();
        Sucursal s = new Sucursal();
        s.setSucursalPK(new SucursalPK(1, 1));
        s.setNombre("FROGS PLAZA MUNDO");
        s.setEstatus("A");
        s.setFecha(new java.util.Date());
        s.setEmpresa1(new Empresa(1));
        try {
        ms.persistObject(s);
        } catch (FrogsPersistException ex) {
        Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
         */
        /*
        ManagerCategoria mc = new ManagerCategoria();
        Categoria c = new Categoria();
        c.setCategoriaPK(new CategoriaPK(1, 5));
        c.setEmpresa1(new Empresa(1));
        c.setFecha(new java.util.Date());
        c.setEstatus("A");
        c.setNombre("Otros");
        try {
        mc.guardaCategoria(c);
        } catch (FrogsPersistException ex) {
        Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
         */
        /*
        ManagerSubCategoria mc = new ManagerSubCategoria();
        Subcategoria c = new Subcategoria();
        c.setCategoria1(new Categoria(new CategoriaPK(1, 1)));
        c.setEstatus("A");
        c.setFecha(new java.util.Date());
        c.setNombre("Botas");
        c.setSubcategoriaPK(new SubcategoriaPK(1, 1, 1));
        try {
        mc.guardaSubCategoria(c);
        } catch (FrogsPersistException ex) {
        Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
         */
        /*
        ManagerEstilo me = new ManagerEstilo();
        Estilo e = new Estilo();
        //e.setCodigo(1);
        e.setEstatus("A");
        e.setFecha(new java.util.Date());
        e.setNombre("Otros");
        e.setObservacion("Ninguna");
        try {
        me.guardaEstilo(e);
        } catch (FrogsPersistException ex) {
        Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
         */
        /*
        ManagerColor mc = new ManagerColor();
        Color c = new Color();
        //c.setCodigo(1);

        c.setEstatus("A");
        c.setFecha(new java.util.Date());
        c.setNombre("Otros");
        c.setObservacion("Ninguna");
        try {
        mc.guardaColor(c);
        } catch (FrogsPersistException ex) {
        Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
         */
        /*Actualizar*/
        /*
        c.setCodigo(5);
        c.setEstatus("A");
        c.setFecha(new java.util.Date());
        c.setNombre("Amarillo");
        c.setObservacion("Ninguna");

        try {
        mc.actualizaColor(c);
        } catch (FrogsMergeException ex) {
        Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
         */
        /*
        ManagerTalla mt = new ManagerTalla();
        try {
        mt.eliminaTalla(new Talla(42));
        } catch (FrogsRemoveException ex) {
        Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
         *
         */
    }
}
